package com.chinairi.mall.dao;

import com.chinairi.mall.model.OrderCommodityTrackInformationYes;
import com.chinairi.mall.service.modelobject.OCTAForSPMO;
import com.chinairi.mall.controller.viewobject.OCTIForSPVO;
import com.chinairi.mall.model.OrderCommodityTrack;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chinairi.mall.service.modelobject.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 服务单号商品绑定追踪节点表 Mapper 接口
 * </p>
 *
 * @author Webgasd
 * @since 2020-08-30
 */
public interface OrderCommodityTrackMapper extends BaseMapper<OrderCommodityTrack> {
    /**
     * 根据服务单号搜索对应的商品三大类类别
     * @param serviceId
     * @return
     */
    ViewServiceOGClassMO selectByServiceId(@Param("serviceId") String serviceId);

    /**
     * 根据类别和服务类别获取节点列表
     *
     * @param type
     * @param first
     * @param second
     * @param third
     * @return
     */
    String selectByClass(@Param("type") String type, @Param("first") String first, @Param("second") String second, @Param("third") String third);

    /**
     * 获取对应供应商的服务-节点-商品列表
     *
     * @param search
     * @return
     */
    List<OCTAForSPMO> getAlarmListSP(@Param("search") OCTAForSPMO search);

    /**
     * 获取对应供应商的服务-节点-商品列表,传出报警
     *
     * @param search
     * @return
     */
    List<OCTIForSPVO> getInformationlistSP(@Param("search") OCTIForSPVO search);

    /**
     * 批量插入
     * @param orderCommodityTrackList
     */
    void batchInsert(@Param("orderCommodityTrackList") List<OrderCommodityTrack> orderCommodityTrackList);
}
